<template>
	<div>
		<vxe-button status="primary" @click="open(false)">Open notice</vxe-button>
		<vxe-button @click="open(true)">Open notice(only title)</vxe-button>
		<br />
		<vxe-button @click="info(false)">Info</vxe-button>
		<vxe-button @click="success(false)">Success</vxe-button>
		<vxe-button @click="warning(false)">Warning</vxe-button>
		<vxe-button @click="error(false)">Error</vxe-button>
		<br />
		<vxe-button @click="info(true)">Info</vxe-button>
		<vxe-button @click="success(true)">Success</vxe-button>
		<vxe-button @click="warning(true)">Warning</vxe-button>
		<vxe-button @click="error(true)">Error</vxe-button>
		<br />
		<vxe-button status="primary" @click="time">Open notice</vxe-button>
	</div>
</template>

<script>
export default {
	name: 'BaseNotification',
	data() {
		return {}
	},
	methods: {
		open(nodesc) {
			this.$Notice.open({
				type: 'warning',
				title: 'Notification title',
				placement: 'left-top',
				content: nodesc ? '' : 'Here is the notification description. Here is the notification description. '
			})
		},
		info(nodesc) {
			this.$Notice.info({
				title: 'Notification title',
				content: nodesc ? '' : 'Here is the notification description. Here is the notification description. '
			})
		},
		success(nodesc) {
			this.$Notice.success({
				title: 'Notification title',
				content: nodesc ? '' : 'Here is the notification description. Here is the notification description. '
			})
		},
		warning(nodesc) {
			this.$Notice.warning({
				title: 'Notification title',
				content: nodesc ? '' : 'Here is the notification description. Here is the notification description. '
			})
		},
		error(nodesc) {
			this.$Notice.error({
				title: 'Notification title',
				content: nodesc ? '' : 'Here is the notification description. Here is the notification description. '
			})
		},
		time() {
			this.$Notice.open({
				title: 'Notification title',
				content: 'This notification does not automatically close, and you need to click the close button to close.',
				duration: 0
			})
		}
	}
}
</script>

<style scoped lang="scss"></style>
